<#assign pojo=oneToManyPojo.getOne()>
<#assign many=oneToManyPojo.getMany()>
<#assign ones=oneToManyPojo.getOnes()>
<#assign fields=pojo.getFilterdPojoFields()>
<#assign declarationName = pojo.importType(pojo.getDeclarationName())>
<#assign declarationNameFirstLetterLower = pojo.importType(pojo.getDeclarationNameFirstLetterLower())>
<#assign realPackageAndClassPath = "${pojo.getRealPackageAndClassPath()}">
<#assign masterid = pojo.getDeclarationNameFirstLetterLower()+"Id">
<form nz-form [formGroup]="filterForm" class="ant-advanced-search-form">
<#assign fields=pojo.getPojoFields()>
<#foreach field in fields>
<#if field.getIsSampleField()>
  <div nz-form-item nz-row>
    <div nz-form-label nz-col [nzSpan]="7">
      <label nz-form-item-required><#if field.getComment()?exists>${field.getComment()}<#else>${field.getName()}</#if></label>
    </div>
    <div nz-col [nzSpan]="12" nz-form-control [nzValidateStatus]="filterForm.controls.code" nzHasFeedback>
      <nz-input
        formControlName="${field.getName()}"
        [nzType]="'text'"
        [nzPlaceHolder]="'<#if field.getComment()?exists>${field.getComment()}<#else>${field.getName()}</#if>'"
        [ngModel]="entity.${field.getName()}"
        [nzSize]="'large'">
      </nz-input>
      <div nz-form-explain *ngIf="filterForm.controls.${field.getName()}.dirty&&filterForm.controls.${field.getName()}.hasError('required')">Please
        input your ${field.getName()}!
      </div>
    </div>
  </div>
</#if>
</#foreach>
</form>
<div nz-form-item nz-row>
  <div nz-col [nzOffset]="7" [nzSpan]="12" nz-form-control>
    <button nz-button [nzType]="'primary'" [nzSize]="'large'" [disabled]="!filterForm.valid"
            (click)="onOk.emit({entity:filterForm.value})">Submit
    </button>
    <button nz-button [nzSize]="'large'" (click)="resetForm($event)">resetForm</button>
    <button nz-button [nzSize]="'large'" (click)="onCancel.emit()">onCancel</button>
  </div>
</div>
